import { Rule } from '@midwayjs/validate';
import { ApiProperty } from '@midwayjs/swagger';
import { BaseError as R } from '../../../common/base.error';
import { requiredString } from '../../../common/common.validate.rules';
import { RoomUseRecordsEntity } from '../entity/roomUseRecords';
import { BaseDTO } from '../../../common/base.dto';

export class RoomUseRecordsDTO extends BaseDTO<RoomUseRecordsEntity> {
  @ApiProperty({
    description: '房间名称',
  })
  @Rule(requiredString.error(R.validateError('房间名称不能为空')))
  roomName?: string;

  @ApiProperty({
    description: '房间ID',
  })
  @Rule(requiredString.error(R.validateError('房间ID不能为空')))
  roomId?: string;

  @ApiProperty({
    description: '房间类型',
  })
  @Rule(requiredString.error(R.validateError('房间类型不能为空')))
  roomType?: string;

  @ApiProperty({
    description: '开始使用时间',
  })
  @Rule(requiredString.error(R.validateError('开始使用时间不能为空')))
  startTime?: string;

  @ApiProperty({
    description: '结束时间',
  })
  @Rule(requiredString.error(R.validateError('结束时间不能为空')))
  endTime?: string;

  @ApiProperty({
    description: '购买时长',
  })
  @Rule(requiredString.error(R.validateError('购买时长不能为空')))
  useTime?: string;

  @ApiProperty({
    description: '是否超出',
  })
  @Rule(requiredString.error(R.validateError('是否超出不能为空')))
  isOut?: boolean;

  @ApiProperty({
    description: '开始计费时间',
  })
  @Rule(requiredString.error(R.validateError('开始计费时间不能为空')))
  startChargeTime?: string;

  @ApiProperty({
    description: '结束计费时间',
  })
  @Rule(requiredString.error(R.validateError('结束计费时间不能为空')))
  endChargeTime?: string;

  @ApiProperty({
    description: '超出时长',
  })
  @Rule(requiredString.error(R.validateError('超出时长不能为空')))
  outTime?: string;
}